from django.urls import path, include
from rest_framework.routers import DefaultRouter

from django.contrib import admin
from django.conf import settings
from django.conf.urls.static import static
urlpatterns = [
    path('admin/', admin.site.urls),
    path('api/', include('user.urls')),
    path('api/', include('note.urls')),
    path('api/', include('history.urls')),  # 引入 blog 应用的 url
]
# 仅在开发环境使用
if settings.DEBUG:
    urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)